package com.sc.nft.entity.vo;

import com.sc.nft.enums.MarketTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class NewFreeMarketPageVO {
    @ApiModelProperty("id")
    private Long configId;

    @ApiModelProperty("藏品Id")
    private Long collectionId;

    @ApiModelProperty("一级标题")
    private String firstTitle;

    @ApiModelProperty("在售数量")
    private String salesCount;

    @ApiModelProperty("发行量")
    private Long sumCount;

    @ApiModelProperty("最小价格")
    private String minPrice;
    @ApiModelProperty("最大价格")
    private String maxPrice;
    @ApiModelProperty("地板价")
    private String startPrice;
    @ApiModelProperty("今日涨幅")
    private String toDayIncrease;
    @ApiModelProperty("累积涨幅")
    private String cumulativeIncrease;

    @ApiModelProperty("封面图")
    private String creationContent;

    @ApiModelProperty("BRAND_INCUBATION:品牌孵化  FREE_MARKET:自由市场")
    private MarketTypeEnum marketType;


    public void setMinPrice(BigDecimal minPrice) {
        this.minPrice = minPrice.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setMaxPrice(BigDecimal maxPrice) {
        this.maxPrice = maxPrice.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }

    public void setStartPrice(BigDecimal startPrice) {
        this.startPrice = startPrice.setScale(2, BigDecimal.ROUND_DOWN).toPlainString();
    }
}
